<%@ page contentType="text/html;charset=UTF-8" language="java" %>


<%
    String path = request.getContextPath();
%>
<html>
<head>
    <style type="text/css">
        body{
            margin:0px; padding:0px; width:100%;text-align:center;
        }
        .top{
            font-size:50px;
            padding-top:150px;
            text-align:center;
        }

        .login{
            padding-left:50px;
            text-align:center;
            background:url("static/images/bank.png") ;
            background-repeat:no-repeat ;
            background-size:100% 100%;
            height:645px;
        }
        .mid{
            padding-top:30px;
            text-align:center;

        }
    </style>

</head>
<body>
<script language="javascript">
    function login() {
        var f=document.frm1;
        if(f.userName.value==""){
            alert("请输入用户名")
            f.userName.focus();
            return false;
        }
        if (f.password.value.left<3||f.password.value==""){
            alert("请输入至少3个字符的密码！")
            f.password.focus();
            return  false;
        }
        document.frm1.action="<%=path%>/login";
        document.frm1.submit();
    }
    function register() {
        document.frm1.action="<%=path%>/register";
        document.frm1.submit()
    }
</script>

<div class="login">
    <div class="top" >银行管理系统</div><br><br>

    <form name="frm1" method="post">
        <div class="mid">
            <span>用户:</span>
            <input type="text" name="userName"><br><br>


            <span>密码:</span>
            <input type="password" name="password"><br><br>
            <input type="button" onclick="login()" value="登录" style="
    margin-top: 10px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <input type="button" onclick="register()" value="注册">
        </div><br><br>
    </form>

</div>
<h3>
    <a href="${pageContext.request.contextPath}/adminLogin">点击进入管理员页面</a>
</h3>
</body>

</html>